import { useEffect } from "react";
import { useDispatch } from "react-redux";
import { closeLoading } from "../redux/slices/storeSlice";

const useCloseLoadingOnMount = () => {
  const dispatch = useDispatch();

  useEffect(() => {
    dispatch(closeLoading());
  }, [dispatch]);
};

export default useCloseLoadingOnMount;
